package org.example.springbookdamo.Controller;

import org.example.springbookdamo.Service.BookService;
import org.example.springbookdamo.model.Bookinfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;

@RequestMapping("/book")
@RestController
public class BookConroller {
    @Autowired
    private  BookService bookService;
    @RequestMapping("/getlist")
    public List<Bookinfo> getlist() {
        //理应从数据库中查询，为学习数据库相关操作
        //BookService bookService = new BookService();
       return bookService.getlist();
    }


}
